@(title: String, message: String = null)(content: Html)

<!--   @@import be.objectify.deadbolt.views.html._
@@import be.objectify.deadbolt.utils.TemplateUtils._--> 

<!DOCTYPE html>

<html>
    <head>
        <title>@title</title>		
		<link rel="stylesheet" media="screen" href="@routes.Assets.at("bootstrap/css/bootstrap.css")">
		<link rel="stylesheet" media="screen" href="@routes.Assets.at("bootstrap/css/bootstrap-responsive.css")">
		<link rel="stylesheet" media="screen" href="@routes.Assets.at("fontello/css/fontello.css")">
		<link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
		<script src="@routes.Assets.at("javascripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
		<script src="@routes.Assets.at("bootstrap/js/bootstrap.js")" type="text/javascript"></script>
    </head>
    <body>
	<div class="navbar">
		<div class="navbar-inner">
			<ul class="nav">
				<li class=""><a href="/home">Home</a></li>
				<!-- @@restrict(la(as("admin"))) {-->
					<li class="dropdown">
					    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
					      Admin
					      <b class="caret"></b>
					    </a>
					    <ul class="dropdown-menu">
					      	<li><a href="/service/" >Service</a></li>
					      	<li><a href="/service/status" >Status</a></li>
							 <li><a href="/service/add" >Add</a></li>
							 <li><a href="/service/refresh" >Refresh</a></li>
							 <li><a href="/recommendation" >Recommendations</a></li>
					    </ul>
					  </li>
				  <!--}-->
				<li><a href="/about">?</a></li>
			</ul>
			<ul class="nav pull-right">
				<li>
					<form class="pull-right navbar-form" action = "/search" method="POST">
			            <div class="input-append">
			              <input 
			              		class="span2" 
			              		name="text" 
			              		size="16" 
			              		type="text"			              	
								placeHolder="search text"/>			              
	        			  <input class="btn" type="submit" value="Go!">
			            </div>
          			</form>
				</li>
				<li>
				@if(session.get("user") == "" || session.get("user") == null){
					<a href="/login" class="has-tooltip" rel="tooltip" data-placement="bottom" data-original-title="Login"><i class="icon-login"></i></a>
				}else{
					<a href="/logout" class="has-tooltip" rel="tooltip" data-placement="bottom" data-original-title="Logout"><i class="icon-logout"></i></a>
				}
				</li>
			</ul>
		</div>
			
	</div>
	<div class="container-fluid">
		@if(message != null && message != ""){
			<div class="alert alert-success"><button type="button" class="close" data-dismiss="alert">x</button>@message</div>
		}
		
		@if(flash.contains("success")) {
		    <p class="success">
				<div class="alert alert-success"><button type="button" class="close" data-dismiss="alert">x</button>@flash.get("success")</div>		       
		    </p>
		}		
		@if(flash.contains("error")) {
		    <p class="success">
				<div class="alert alert-error"><button type="button" class="close" data-dismiss="alert">x</button>@flash.get("error")</div>
		    </p>
		}
		@if(flash.contains("warning")) {
		    <p class="success">
				<div class="alert alert-warning"><button type="button" class="close" data-dismiss="alert">x</button>@flash.get("warning")</div>
		    </p>
		}
        @content
    </div>
    <script type="text/javascript">
    	$('.has-tooltip').tooltip();
    </script>
    </body>
</html>
